package com.waijiaojun.tpo.repository;

import com.waijiaojun.tpo.vo.IndexData;
import com.waijiaojun.tpo.vo.StatisticsErrorsQuestionVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import com.waijiaojun.tpo.entity.UserAnswers;
import org.springframework.stereotype.Component;

@Component
@Mapper
public interface UserAnswersDao {
    int insert(@Param("pojo") UserAnswers pojo);

    int insertSelective(@Param("pojo") UserAnswers pojo);

    int insertList(@Param("pojos") List<UserAnswers> pojo);

    int update(@Param("pojo") UserAnswers pojo);

    IndexData getDurationSumByOpenid(@Param("openid") String openid);

    List<UserAnswers> findByScenarioIdAndOpenid(@Param("openid") String openid, @Param("scenarioId") Long scenarioId);

    void deleteByIds(@Param("ids")List<Long> ids);

    List<StatisticsErrorsQuestionVo> statistics(String openid);

    Integer studyVocabularyNumber(@Param("openid")String openid);
}
